#!/bin/sh
ulimit -c unlimited 
export ROOT=$(cd `dirname $0`; pwd)
export DAEMON=false

##查找skynet的根目录
if [ ! $SKYNET ]; then  
  echo "can't find skynet path!"
  exit 1  
fi 

export CASH_GROUP=1
export PIDFILE=$ROOT/run/cash1.pid
echo $CASH_GROUP>$ROOT/run/cash.group

while getopts "dk" arg
do
	case $arg in
		d)
			export DAEMON=true
			;;
		k)
			kill `cat $PIDFILE`
			exit 0;
			;;
	esac
done

$SKYNET/skynet $ROOT/etc/cash_config.lua
